function getdata0(callbck) {
    setTimeout(() => {
        callbck('hello world0')
    },1000)
}
getdata0((arr) => {
    console.log(arr)
})


function getdata() {
    return new Promise((resolve, reject) => {
        setTimeout(() => {
            resolve('hello world1')
        }, 1000)
    })
}
const getdata1=new Promise((resolve,reject)=>{
    setTimeout(()=>{
        resolve('hello world2')
    },1000)
})


getdata().then(res=>{
    console.log(res)
})

getdata1.then(res=>{
    console.log(res)
})

function test(resolve, reject) {
    setTimeout(() => {
        resolve('hello world3')
    }, 1000)
}
const test1=new Promise(test)
test1.then(res=>{
    console.log(res)
})



async function test2() {
    const res=await getdata()
    console.log(res)
}
test2()